/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.restaurant.facade;

import com.restaurant.entities.ProductTypes;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 *
 * @author Dexter
 */
@Stateless
public class ProductTypesFacade extends AbstractFacade<ProductTypes> implements ProductTypesFacadeLocal {
    @PersistenceContext(unitName = "com.restaurant_Restaurant_ZPHE-ejb_ejb_1.0-SNAPSHOTPU")
    private EntityManager em;

    @Override
    protected EntityManager getEntityManager() {
        return em;
    }

    public ProductTypesFacade() {
        super(ProductTypes.class);
    }
    
    @Override
    public void create(ProductTypes entity) {
        getEntityManager().persist(entity);
    }
    
    @Override
    public void edit(ProductTypes entity) {
        getEntityManager().merge(entity);
    }

}
